package com.gzsxy.builder.demo1;


import com.gzsxy.builder.demo1.Product;

/**
 * @author xiaolong
 * @version 1.0
 * @description: 具体的建造者：服务员
 * @date 2022/4/10 21:49
 */
public class Worker extends Builder {
    private Product product;

    public Worker() {
        product = new Product();
    }

    @Override
    Builder buildA(String msg) {
        product.setBuildA(msg);
        return this;
    }

    @Override
    Builder buildB(String msg) {
        product.setBuildB(msg);
        return this;
    }

    @Override
    Builder buildC(String msg) {
        product.setBuildC(msg);
        return this;
    }

    @Override
    Builder buildD(String msg) {
        product.setBuildD(msg);
        return this;
    }



    @Override
    Product getProduct() {
        return product;
    }
}
